package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class LikeRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Post_Praise";

    private String diaryId;

    private String uuid;

    public String getDiaryId() {
        return diaryId;
    }

    public void setDiaryId(String diaryId) {
        this.diaryId = diaryId;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        LikeRequestBody body = new LikeRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setDiaryId(getDiaryId());
        body.setUuid(getUuid());
        return body;
    }

    private class LikeRequestBody extends BaseTokenRequestBody {

        @SerializedName("DiaryID")
        private String diaryId;

        @SerializedName("Identity")
        private String uuid;

        private LikeRequestBody() {
            setSv(BaseRequestConfig.SV_LIKE);
        }

        public String getDiaryId() {
            return diaryId;
        }

        public void setDiaryId(String diaryId) {
            this.diaryId = diaryId;
        }

        public String getUuid() {
            return uuid;
        }

        public void setUuid(String uuid) {
            this.uuid = uuid;
        }
    }
}
